<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改轨道')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-station-edit" th:object="${station}">
            <input name="stationId" th:field="*{stationId}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">轨道起点站名：</label>
                <div class="col-sm-8">
                    <input name="stationName" th:field="*{stationName}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">轨道起点经度：</label>
                <div class="col-sm-8">
                    <input name="longitude" th:field="*{longitude}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">轨道起点纬度：</label>
                <div class="col-sm-8">
                    <input name="latitude" th:field="*{latitude}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">轨道终点站名：</label>
                <div class="col-sm-8">
                    <input name="stationInfo" th:field="*{stationInfo}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">轨道终点经度：</label>
                <div class="col-sm-8">
                    <input name="avglon" th:field="*{avglon}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">轨道终点纬度：</label>
                <div class="col-sm-8">
                    <input name="avgla" th:field="*{avgla}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">两站距离：</label>
                <div class="col-sm-8">
                    <input name="distance" th:field="*{distance}" class="form-control" type="text" required>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script type="text/javascript">
        var prefix = ctx + "demo/station";
        $("#form-station-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-station-edit').serialize());
            }
        }
    </script>
</body>
</html>